<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('新增AI站点')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-site-add">
			<div class="form-group">
				<label class="col-sm-3 control-label">站点名称：</label>
				<div class="col-sm-8">
					<input name="siteName" placeholder="请输入站点名称" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">站点描述：</label>
				<div class="col-sm-8">
					<input name="siteDesc" placeholder="请输入站点描述" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">站点域名：</label>
				<div class="col-sm-8">
					<input name="domain" placeholder="请输入站点域名" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">站点状态：</label>
				<div class="col-sm-8">
				    <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
						<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
						<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
					</div>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "aisite/site";
		
		$("#form-site-add").validate({
			rules: {
				siteName: {
					required: true
				}
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-site-add').serialize());
	        }
	    }
	</script>
</body>
</html>